The present invention relates generally to network systems using redundant or standby devices working together in a redundancy group to provide a virtual router service. More particularly, the present invention relates to methods and apparatus for providing network address translation services while allowing the forwarding of packets using virtual router service.
Private networks are commonly connected to the Internet through one or more gateway devices (for example, routers) so that hosts (PCs or other arbitrary network entities) on the private network can communicate with nodes on the Internet. Typically, the host will send packets to locations identified using an address (for example, an Internet Protocol or “IP” address) both within its private network and on the Internet. To receive packets from the Internet, a private network or a host on that network must have a globally unique address. Typically, each such address uses a four octet format to generate a 32-bit IP address. These IP addresses often are presented in a dotted decimal format, with each octet written as a decimal integer separated from other octets by decimal points.
Global IP addresses have been issued to enterprises by a central authority known as the Internet Assigned Number Authority (“IANA”). The LANA has issued such addresses in one of three commonly used classes. Class A IP addresses employ their first octet as a “netid” and their remaining three octets as a “hostid.” The netid identifies the enterprise network and the hostid identifies a particular host on that network. As three octets are available for specifying a host, an enterprise having class A addresses has 224 (nearly 17 million) addresses at its disposal for use with possible hosts. Thus, even the largest companies vastly underuse available class A addresses. Not surprisingly, Class A addresses are issued to only very large entities. Class B addresses employ their first two octets to identify a network (the netid) and their second two octets to identify a host (the hostid). Thus, an enterprise having class B addresses can use those addresses on approximately 64,000 hosts. Finally, class C addresses employ their first three octets as a netid and their last octet as a hostid. Only 254 host addresses are available to enterprises having a single class C netid.
There has been a substantial proliferation of hosts on the Internet, coupled with so many class A and B licenses issued to large entities, that it is now nearly impossible to obtain a class B address. Many organizations now requiring Internet access have far more than 254 hosts—for which unique IP addresses are available with a single class C network address. It is more common for a mid to large size enterprise to have 1,000 to 10,000 hosts. Such companies simply can not obtain enough IP addresses for each of their hosts.
To address this problem, a Network Address Translation (“NAT”) protocol has been developed. See K. Egevang and P. Francis, “The IP Network Address Translator (NAT),” Request For Comments “RFC” 1631, Cray Communications, NTT, May 1994 which is incorporated herein by reference for all purposes. NAT is based on the concept of address reuse by and within private networks, and operates by mapping reusable or private IP addresses (see, RFC 1918, referenced and incorporated below) of a leaf or stub domain to globally unique addresses which are required for communication with hosts on the Internet. In implementation, a local host wishing to access the Internet receives a temporary IP address from a pool of such addresses available to the enterprise (for example, 254 class C addresses). While the host is sending and receiving packets on the Internet, it has a global IP address which is unavailable to any other host. After the host disconnects from the Internet, the enterprise can take back the global IP address and make it available to other hosts wishing to access public networks or the Internet. Through static NAT mappings, global IP addresses can be assigned to hosts using private IP addresses on a permanent basis so that, for example, parties attempting to reach the local hosts from outside a private network do not have to know the local IP addresses. These static mappings can be maintained by routers or other gateway devices that separate the private network from a public network like the Internet. To implement a NAT, a translation system must be provided between the enterprise private network and the Internet (or other public network). This means that NAT services, including static NAT mappings, are implemented at gateway positions.
As noted above, local area networks (LANs) are commonly connected with one another through one or more routers so that a host (a PC or other arbitrary LAN entity) on one LAN can communicate with other hosts on different LANs. Typically, the host is able to communicate directly only with the entities on its local LAN segment. When it receives a request to send a data packet to an address that it does not recognize as being local, it communicates through a router (or other layer-3 or gateway device) which determines how to direct the packet between the host and the destination address in a remote network. Unfortunately, a router may, for a variety of reasons, become inoperative (e.g., a power failure, rebooting, scheduled maintenance, etc.) creating a trigger event. Such potential router failure has led to the development and use of redundant systems, which have more than one router to provide a back up in the event of primary router failure. When a router fails, the host communicating through the inoperative router may still remain connected to other LANs if it can send packets to another router connected to its LAN.
Various protocols have been devised to allow a host to choose a router from among a group of routers in a network. Two of these, Routing Information Protocol (or RIP) and ICMP Router Discovery Protocol (IRDP) are examples of protocols that involve dynamic participation by the host. However, because both RIP and IRDP require that the host be dynamically involved in the router selection, performance may be reduced and special host modifications and management may be required.
In a widely used and somewhat simpler approach, the host recognizes only a single “default” router. In this approach, the host is configured to send data packets to the default router when it needs to send packets to addresses outside its own LAN. It does not keep track of available routers or make decisions to switch to different routers. This requires very little effort on the host's part, but has a serious danger. If the default router fails, the host cannot send packets outside of its LAN. This may be true even though there may be a redundant router able to take over, because the host does not know about the backup. Unfortunately, such systems have been used in mission critical applications such as stock trading.
The shortcomings of these early systems led to the development and implementation of redundant gateway systems, which provide for potential failovers in gateway settings. One such system is the hot standby router protocol (HSRP) by Cisco Systems, Inc. of San Jose, Calif. A more detailed discussion of the earlier systems and of an HSRP type of system can be found in U.S. Pat. No. 5,473,599 (referred to herein as “the '599 Patent”), entitled STANDBY ROUTER PROTOCOL, issued Dec. 5, 1995 to Cisco Systems, Inc., which is incorporated herein by reference in its entirety for all purposes. Also, HSRP is described in detail in RFC 2281, entitled “Cisco Hot Standby Router Protocol (HSRP)”, by T. Li, B. Cole, P. Morton and D. Li, which is incorporated herein by reference in its entirety for all purposes.
HSRP is widely used to back up primary routers for a network segment. In HSRP, a “standby” router is designated as the back-up to an “active” router. The standby router is linked to the network segment or segments serviced by the active router. The active and standby routers share a “virtual IP address” and possibly a “virtual Media Access Control (MAC) address” which is actually in use by only one router at a time. All internet communication from the relevant private network employs the virtual IP and MAC addresses. At any given time, the active router is the only router adopting and using the virtual addresses. Then, if the active router should cease operation for any reason, the standby router immediately takes over its load (by adopting the virtual addresses). This allows the host to always direct data packets to an operational router without monitoring the routers of the network.
A Cisco HSRP system is shown in FIGS. 1A and 1B. As seen in FIG. 1A, four gateways 110A-D (for example, routers) operate in a normal mode, providing redundant default gateway services in an active/standby configuration for a common IP subnet. In FIG. 1A, the multiple routers 110 (layer-3 switches) form a redundancy group 108 (RG) and share a virtual MAC address 118 and a virtual LP address 116. Hosts 120A-C on a common subnet 130 set their default gateway IP address 126 and MAC address 128 to the virtual addresses 116, 118 within RG 108 for their subnet. In an RG 108 of a prior HSRP system, an “active” RG member 110A (for example, an “Active HSRP enabled router”) is elected based on pre-configured priorities or other suitable criteria and/or methodologies.
The active router 110A of the RG 108 responds to all address resolution protocol (“ARP”) requests (or any similar or analogous mechanisms used by the router for providing address information to requesting parties) for the virtual IP address 116, thus providing default gateway services for all hosts 120 of the common subnet 130 during normal operation. During normal operation, a secondary RG member 110B of the RG 108 remains in a “standby” mode. If the primary member 110A of the RG 108 should fail, as shown in FIG. 1B, the standby router 110B will assume the virtual MAC and IP addresses 118, 116, effectively becoming the primary member (or “active router”) and thereby providing uninterrupted gateway services to the hosts 120 of common subnet 130 without the need for additional ARP discovery/resolution. This configuration provides a reliable fail-over function for the gateway devices.
The collocation of HSRP routers (or other redundancy group gateway devices) and NAT services can lead to problems. When IP redundancy (for example, HSRP) is configured on NAT-enabled interfaces on two or more routers that have the same set of static mappings configured, external users accessing the private network may end up routing traffic through, and thereby traffic being translated on, a non-active redundancy group router. This is due to all routers participating in the redundancy group responding to ARP requests from end-point devices, using each router's own BIA MAC address. Such behavior is not effective for supporting a high-availability routing environment in which only the active router or gateway device is supposed to route traffic.
In view of the foregoing, it would be desirable to provide NAT services for communications from outside a private network while ensuring that redundant gateway services are still available for the private network.